<!--
 * @Description: 
 * @Version: 1.0
 * @Author: Yuanjy
 * @Date: 2020-04-18 18:36:51
 * @LastEditors: Yuanjy
 * @LastEditTime: 2020-04-20 21:02:23
 -->
<template>
  <div>
    <el-button size="mini" type="success" @click="to">编辑</el-button>
    <eForm ref="form" :sup-this="supThis" :is-add="false"/>
  </div>
</template>
<script>
import eForm from './form'

export default {
  components: { eForm },
  props: {
    data: {
      type: Object,
      required: true
    },
    supThis: {
      type: Object,
      required: true
    }
  },
  methods: {
    to() {
      const _this = this.$refs.form
      _this.form = {
        id: this.data.id,
        source: this.data.source,
        channel_code: this.data.channel_code,
        phone: this.data.phone,
        consignee: this.data.consignee,
        status: this.data.status,
        sku_type: this.data.sku_type,
        goods_title: this.data.goods_title,
        goods_info: this.data.goods_info,
        price: this.data.price,
        external_procure_number: this.data.external_procure_number,
        with_meal_powder: this.data.with_meal_powder.toString(),
        is_vip: this.data.is_vip.toString(),
        delivery_address: this.data.delivery_address,
        comments: this.data.comments,
        memo: this.data.memo
      }
      _this.initParam()
      _this.dialog = true
    }
  }
}
</script>

<style scoped>
  div{
    display: inline-block;
    margin-right: 3px;
  }
</style>
